package com.zzh.framework;

import java.util.List;
import java.util.Random;

/**
 * @author：zhangzhanheng
 * @createTime: 2021/8/3  8:27 下午
 * @desc: 负载均衡
 * @version: 1.0.0
 **/
public class LoadBalance {
    /**
     * 随机
     * @param urls
     * @return
     */
    public static URL random(List<URL> urls) {
        Random random = new Random();
        int i = random.nextInt(urls.size());
        return urls.get(i);
    }
}
